
import logging


class Config(object):
    SQLALCHEMY_DATABASE_URI = "mysql://root:mysql@127.0.0.1:3306/factory"
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True

    LOG_LEVEL = logging.DEBUG


class DevelopmentConfig(Config):
    """开发模式下的配置"""

    DEBUG = True


class ProductionConfig(Config):
    """生产模式下的配置"""

    DEBUG = False
    LOG_LEVEL = logging.ERROR


config = {
    "Development": DevelopmentConfig,
    "Production": ProductionConfig
}